<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #d1{
            width:100px;height:50px;background-color: red;
            position: absolute;
            z-index: 1;/*z表示三维坐标z轴,值越大显示层级越高,
            值相同时,后添加的显示在上面,该方法时针对非static元素
            */
        }
        #d2{
            width:50px;height:100px;background-color: green;
            position: absolute;
            z-index: 0;
        }
    </style>
</head>
<body>
<div id="d1"></div>
<div id="d2"></div>
</body>
</html>